<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ghost</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body {
            background-color: #000;
        }
        .container {
            width: 800px;
            height: 280px ;
            margin: 100px auto;
        }
        .container .link {
            width: 205px;
            height: 280px;
            margin: 0 20px;
            float: left;
        }
        .link .icon {
            display: block;
            width: 100%;
            height: 170px;
            margin-bottom: 20px;
            transition: 0.2s linear;
            -webkit-transition: 0.2s linear;
            -ms-transition: 0.2s linear;
            -moz-transition: 0.2s linear;
            -o-transition: 0.2s linear;
        }
        .link-spring .icon {
            background: url("rellax/images/spring.jpg") no-repeat center center;
        }
        .link-summer .icon {
            background: url("rellax/images/summer.jpg") no-repeat center center;
        }
        .link-autumn .icon {
            background: url("rellax/images/autumn.jpg") no-repeat center center;
        }
        .link .icon:hover {
            transform: rotate(360deg) scale(1.2);
            -ms-transform: rotate(360deg) scale(1.2) ;
            -webkit-transform: rotate(360deg) scale(1.2) ;
            -o-transform: rotate(360deg) scale(1.2) ;
            -moz-transform: rotate(360deg) scale(1.2) ;
        }
        .button {
            display: block;
            width: 180px;
            height: 50px;
            text-decoration: none;
            line-height: 50px;
            color: #2DCB70;
            font-weight: bolder;
            border: 2px solid rgba(255,255,255,.8);
            padding-left: 20px;
            margin: 0 auto;
            box-sizing: border-box;
            -moz-box-sizing: border-box ;
            -webkit-box-sizing: border-box ;
            background: url("imgs/三角形.png") no-repeat 135px center ;
            position: relative;
            transition: 0.3s linear;
            -webkit-transition: 0.3s linear;
            -ms-transition: 0.3s linear;
            -moz-transition: 0.3s linear;
            -o-transition: 0.3s linear;
        }
        .button:hover {
            border-color: #fff;
            background-position: 150px;
        }
        .button .line {
            display: block;
            position: absolute;
            background: none;
            transition: 0.3s linear;
            -webkit-transition: 0.3s linear;
            -ms-transition: 0.3s linear;
            -moz-transition: 0.3s linear;
            -o-transition: 0.3s linear;
        }
        .button:hover .line {
            background: #fff;
        }
        .button .line-top {
            height: 2px;
            width: 0px;
            left: -110%;
            top: -2px;
        }
        .button:hover .line-top {
            width: 100%;
            left: -2px;
        }
        .button .line-bottom {
            height: 2px;
            width: 0px;
            right: -110%;
            bottom: -2px;
        }
        .button:hover .line-bottom {
            width: 100%;
            right: -2px;
        }
        .button .line-left {
            width: 2px;
            height: 0px;
            bottom: -110%;
            left: -2px;
        }
        .button:hover .line-left {
            height: 100%;
            bottom: -2px;
        }
        .button .line-right {
            width: 2px;
            height: 0px;
            top: -110%;
            right: -2px;
        }
        .button:hover .line-right {
            height: 100%;
            top: -2px;
        }
        .container .tip {
            position: absolute;
            padding: 0 14px;
            height: 35px;
            line-height: 35px;
            background-color: #2DCB70;
            color: #fff;
            top:160px;
            font-size: 16px;
            font-weight: normal;
            text-transform: none;
            margin: 0 auto;
            border-radius: 3px;
            opacity: 0;
        }
        .tip em {
            font-style: normal;
        }
        .tip span {
            position: absolute;
            width:0;
            height: 0;
            overflow: hidden;
            border:7px solid transparent;
            border-top-color: #2DCB70;
            left: 50%;
            margin-left: -3px;
            bottom: -14px;
        }


    </style>
</head>
<body>
    <div class="container">
        <div class="link link-spring">
            <span class="icon"></span>
            <a href="#" class="button" data-title="这是春天呀">
                <span class="line line-top"></span>
                <span class="line line-left"></span>
                <span class="line line-right"></span>
                <span class="line line-bottom"></span>
                MISSION
            </a>
        </div>
        <div class="link link-summer">
            <span class="icon"></span>
            <a href="#" class="button" data-title="这是夏天呀">
                <span class="line line-top"></span>
                <span class="line line-left"></span>
                <span class="line line-right"></span>
                <span class="line line-bottom"></span>
                MISSION
            </a>
        </div>
        <div class="link link-autumn">
            <span class="icon"></span>
            <a href="#" class="button" data-title="这是秋天呀">
                <span class="line line-top"></span>
                <span class="line line-left"></span>
                <span class="line line-right"></span>
                <span class="line line-bottom"></span>
                MISSION
            </a>
        </div>
        <div class="tip">
            <em></em>
            <span></span>
        </div>
    </div>
</body>
<script src="rellax/jquery1.js"></script>
<script>
    $(function () {
        $('.link .button').hover(function () {
            var title = $(this).attr('data-title');
            $('.tip em').text(title);
            var pos = $(this).offset().left;
            var dis = ($('.tip').outerWidth()-$(this).outerWidth())/2;
            var f = pos-dis;
            $('.tip').css(
                {
                    'left':f+'px','opacity':1
                }
            ).animate({'top':245,'opacity':1},300)
        },function () {
            $('.tip').animate({'top':160,'opacity':0},300)
        })


    })
</script>
</html>